home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / WAIS / ir / cdialect.h next >
Encoding:
C/C++ Source or Header  |  1992-02-02  |  2.5 KB  |  123 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE:
  2.    No guarentees or restrictions.  See the readme file for the full standard
  3.    disclaimer.
  4.  
  5.    5.29.90    Harry Morris, morris@think.com
  6. */
  7.  
  8. /* there are three kinds of C that we have encountered so far:
  9.  
  10.          1. ANSI_LIKE     - full prototypes and stdargs and ansi includes
  11.          2. PROTO_ANSI     - full prototypes, varargs and misc includes
  12.          3. K_AND_R    - k&r prototypes, varargs and misc includes
  13.          
  14.   This file is a mess because some compilers do not handle elif.  sorry.
  15.  
  16.   defined symbols for other machines:
  17.     hp:         hpux
  18.     Next:       NeXT 
  19. */
  20.  
  21. #ifndef C_DIALECT
  22. #define C_DIALECT
  23.  
  24. /*----------------------------------------------------------------------*/
  25.  
  26. #ifdef STDC
  27. #define ANSI_LIKE
  28. #endif /* def STDC */
  29.  
  30. #ifdef __STDC__
  31. #ifndef M_XENIX /* for some reason XENIX defines __STDC__ */
  32. #define ANSI_LIKE
  33. #endif /* ndef M_XENIX */
  34. #endif /* __STDC__ */
  35.  
  36. #ifdef THINK_C
  37. #define ANSI_LIKE
  38. #endif /* THINK_C */
  39.  
  40. #ifdef MPW            
  41. #define ANSI_LIKE
  42. #endif /* MPW */
  43.  
  44. #ifdef VAX_C            /* vms */
  45. #define ANSI_LIKE
  46. #endif /* VAX_C */
  47.  
  48. #ifdef MSC            /* XXX not sure if this is correct */
  49. #define ANSI_LIKE
  50. #endif /* MSC */
  51.  
  52. #ifndef ANSI_LIKE
  53.  
  54. #ifdef SABER            /* c interpreter/debugger */
  55. #define PROTO_ANSI
  56. #endif /* SABER */
  57.  
  58. #ifdef cstar            /* parallel C on the CM */
  59. #define PROTO_ANSI
  60. #endif /* cstar */
  61.  
  62. #ifndef PROTO_ANSI
  63.  
  64. #ifdef SUN_C            /* XXX not sure if this is correct */
  65. #define K_AND_R
  66. #endif /* SUN_C */
  67.  
  68. #ifdef __GNUC__            /* gcc in traditional mode */
  69. #define K_AND_R            /* gcc in ansi mode defines __STDC__ */
  70. #endif /* __GNUC__ */
  71.  
  72. #ifdef M_XENIX
  73. #define K_AND_R
  74. #define NOTCPIP /* doesn't support TCP */
  75. #define SYSV /* is based on system V */
  76. #endif /* M_XENIX */
  77.  
  78. /* otherwise */
  79. #define K_AND_R            /* default to the stone age */
  80.  
  81. #endif /* ndef PROTO_ANSI */
  82. #endif /* ndef ANSI_LIKE */
  83.  
  84. /* set up the function prototyping convention */
  85.  
  86. #ifdef ANSI_LIKE
  87. #define _AP(args) args
  88. #endif /* def ANSI_LIKE */
  89.  
  90. #ifdef PROTO_ANSI
  91. #define _AP(args) args
  92. #endif /* def PROTO_ANSI */
  93.  
  94. #ifdef K_AND_R
  95. #define _AP(args) ()
  96. #endif /* def K_AND_R */
  97.  
  98. /* if you are not k_and_r, then load in ustubs always */
  99. #ifdef K_AND_R
  100. #include "ustubs.h"
  101. #endif /* def K_AND_R */
  102.  
  103. /* Comment this back in to figure out what the compiler thinks we are */
  104. /*
  105. #ifdef ANSI_LIKE
  106. WeareAnsiLike
  107. #endif
  108. #ifdef PROTO_ANSI
  109. WeareProtoAnsi
  110. #endif
  111. #ifdef K_AND_R
  112. WeareKandR
  113. #endif
  114. Crash-and-Burn
  115. */
  116. /* End of chunk to comment back in */
  117.  
  118. #endif /* ndef C_DIALECT */
  119.  
  120. /*----------------------------------------------------------------------*/
  121.  
  122.  
  123.